<script type="text/javascript">
<!--
	function delgroupe(id)
	{
	   if (confirm('{$lang.Confirmation_suppression_groupe} ?'))
	   {
            document.location.href = 'groupe.php?delete&token={$token}&groupe_id='+id;
        }
	}
// -->
</script>
<h3>{$lang.Gestion_groupe}</h3>
<br /><br />

{if $error_msg == true}
<span id="errorh"></span>
<div id="error_msg">
	<div class="{$error_class}" style="width:500px;margin:auto;padding:15px;">
		<img src="{$url_site}images/{$error_image}.png" alt="" style="float:left;padding-right:6px;" /> {$error_message}
	</div>
	<br />
</div>
<script type="text/javascript">
<!--
	//Javascript timeout to hide this message
	setTimeout('Effect.Fade("error_msg");', 3000);
-->
</script>
<br /><br />
{/if}

<table style="width:95%; margin: auto;" cellpadding="1" cellspacing="1">
	<tr>
		<td class="thead"><strong>#</strong></td>
		<td class="thead"><strong>{$lang.Nom}</strong></td>
		<td class="thead"><strong>{$lang.Description}</strong></td>
		<td class="thead"><strong>{$lang.Action}</strong></td>
	</tr>
	
    {section name=groupe loop=$groupes}
	<tr>
		<td class="tcontenue">{$groupes[groupe].id}</td>
		<td class="tcontenue">{$groupes[groupe].nom}</td>
		<td class="tcontenue">{$groupes[groupe].description}</td>
		<td class="tcontenue">{$groupes[groupe].action}</td>
	</tr>
	{/section}
    
</table>

{* Formulaire d ajout de groupe *}
<br /><br />
<fieldset style="margin:auto; width:75%;">
    <legend>{$lang.Ajouter_un_groupe}</legend>
    <br /><br />
    <form method="post" action="groupe.php">
    <table style="width:100%; margina:auto;">
        <tr>
            <td class="tcontenue"><label>{$lang.Nom}</label></td>
            <td class="tcontenue"><input type="text" name="nom" /></td>
        </tr>
        <tr>
            <td class="tcontenue"><label>{$lang.Description}</label></td>
            <td class="tcontenue"><textarea name="description"></textarea></td>
        </tr>
        <tr>
            <td colspan="2" style="text-align:center;">
                <input type="hidden" name="token" value="{$token}" />
                <input type="submit" name="add" value="{$lang.Enregistrer}"/>
            </td>
        </tr>
    </table>
    </form>
</fieldset>
<br /><br />